<template>
<!-- 综合事务区 -->
  <div class="affairs">
    <div class="affairs-title">
      <div class="affairs-left">综合事务区</div>
      <div class="affairs-right">更多 >
      </div>
    </div>
    <div class="affairs-content">
      <div class="affairs-item" 
      @click="()=>(this.$message('点击了：'+item.name))" 
        v-for="(item,index) in affairsList" 
        :key="item.id">
        {{item.name}}
      </div>
    </div>
  </div>
  <!-- 培训学习 -->
  <div class="training">
    <div class="training-title">
      <div class="training-left">培训学习</div>
      <div class="training-right">更多 >
      </div>
    </div>
    <div class="training-content">
      <div class="training-item" >
        <span>岗位技能提升培训报名</span>
      </div>
    </div>
  </div>
  <!-- 公司制度 -->
  <div class="company">
    <div class="company-title">
      <div class="company-left">公司制度</div>
      <div class="company-right">更多 >
      </div>
    </div>
    <div class="company-content">
      <div class="company-item" >
        <ul>
          <li v-for="(item,index) in companyList" :key="item.id">
            <div class="company-item-left"><i>·</i> {{item.name}}</div>
            <div class="company-item-right">02.21</div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref } from 'vue'
const affairsList = ref([
  { name: '用餐登记' ,id:1},
  { name: '用餐' ,id:2},
  { name: '出差申请' ,id:3},
  { name: '请假登记' ,id:4},
  { name: '报销审查' ,id:5},
  { name: '更多' ,id:6},
])
const companyList = ref([
  { name: '考勤制度' ,id:1,time:'02.21'},
  { name: '办公环境制度' ,id:2,time:'02.22'},
  { name: '会议制度' ,id:3,time:'02.22'},
  { name: '保密制度' ,id:4,time:'02.24'},
  { name: '办公用品领用制度' ,id:5,time:'02.24'},
])
</script>

<style lang="scss" scoped>
.affairs {
  background: white;
  border-radius: 8px;
  padding: 15px;
  .affairs-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 58px;
    font-size:18px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    .affairs-left {
      font-weight: bold;
      color: #333;
    }
    .affairs-right {
      color: #9b9e9e;
   }
  
  }
  .affairs-content{
    padding-top:15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    .affairs-item{
      border: 1px solid #ececec;
      text-align: center;
      width: 90px;
      height: 50px;
      border-radius: 5px;
      line-height: 50px;
      margin-bottom: 15px;
      // margin-right:10px ;
      cursor: pointer;
    }
  }
}
// 培训学习
.training {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;;
  .training-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 58px;
    font-size:18px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    .training-left {
      font-weight: bold;
      color: #333;
    }
    .training-right {
      color: #9b9e9e;
   }
  }
  .training-content{
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
    position: relative;
    width: 310px;
    height: 200px;
    background: url('https://sef.gxu.edu.cn/__local/3/3B/99/9206DCEB1BD830D2436F7110F15_015AFF82_BBD90.jpg') no-repeat center center / cover;
    .training-item{
      position: absolute;
      bottom: 0;
      left: 0;
      color: white;
      font-size: 16px;
      line-height: 30px;
      background: rgba($color: #4d4d4d, $alpha: 0.7);
      width: 100%;
      padding-left: 15px;
      letter-spacing: 2px;
    }
  }
}
// 公司制度
.company {
  background: white;
  border-radius: 8px;
  padding: 15px;
  margin-top: 15px;;
  .company-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 58px;
    font-weight: bold;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    .company-left {
      font-weight: bold;
      color: #333;
    }
    .company-right {
      color: #9b9e9e;
   }
  }
  .company-content{
    .company-item{
      ul{
        padding: 15px 0;
        li{
          display: flex;
          justify-content: space-between;
          margin: 10px 0;
        }
      }
    }
  }
}
</style>